<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 3使用组件 -->
        <headers></headers>
        <footers></footers>
    </div>
</body>
<script src="./vue.min.js"></script>
<script>
    // 1.创建组件
    let headers = {
        template: `<div>
            <h1>头部组件</h1>
            <p>6666</p>
        </div>`
    }
    let footers = {
        template:`<div>
            <h1>底部组件</h1>
            <p>6666</p>
        </div>`
    }
    let vm = new Vue({
        el:"#app",
        data:{},
        // 2注册组件
        components:{
            headers:headers,
            footers:footers
        }
    })
</script>
</html>